home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / doom / quake.zip / HIPGRAPL.ZIP / HIPSUBS.QC < prev    next >
Text File  |  1997-01-16  |  7KB  |  212 lines

  1. //=========================
  2. //
  3. // Hipnotic Sub-routines
  4. //
  5. //=========================
  6.  
  7.  
  8. //=========================
  9. //
  10. // SUB_CopyEntity
  11. //
  12. //=========================
  13.  
  14. void (entity srcent, entity destent) SUB_CopyEntity =
  15.    {
  16.    destent.modelindex=srcent.modelindex;
  17.    destent.absmin=srcent.absmin;
  18.    destent.absmax=srcent.absmax;
  19.    destent.ltime=srcent.ltime;
  20.    destent.movetype=srcent.movetype;
  21.    destent.solid=srcent.solid;
  22.    destent.origin=srcent.origin;
  23.    destent.oldorigin=srcent.oldorigin;
  24.    destent.velocity=srcent.velocity;
  25.    destent.angles=srcent.angles;
  26.    destent.avelocity=srcent.avelocity;
  27.    destent.punchangle=srcent.punchangle;
  28.    destent.classname=srcent.classname;
  29.    destent.model=srcent.model;
  30.    destent.frame=srcent.frame;
  31.    destent.skin=srcent.skin;
  32.    destent.effects=srcent.effects;
  33.    destent.mins=srcent.mins;
  34.    destent.maxs=srcent.maxs;
  35.    destent.size=srcent.size;
  36.    destent.touch=srcent.touch;
  37.    destent.use=srcent.use;
  38.    destent.think=srcent.think;
  39.    destent.blocked=srcent.blocked;
  40.    destent.nextthink=srcent.nextthink;
  41.    destent.groundentity=srcent.groundentity;
  42.    destent.health=srcent.health;
  43.    destent.frags=srcent.frags;
  44.    destent.weapon=srcent.weapon;
  45.    destent.weaponmodel=srcent.weaponmodel;
  46.    destent.weaponframe=srcent.weaponframe;
  47.    destent.currentammo=srcent.currentammo;
  48.    destent.ammo_shells=srcent.ammo_shells;
  49.    destent.ammo_nails=srcent.ammo_nails;
  50.    destent.ammo_rockets=srcent.ammo_rockets;
  51.    destent.ammo_cells=srcent.ammo_cells;
  52.    destent.items=srcent.items;
  53.    destent.takedamage=srcent.takedamage;
  54.    destent.chain=srcent.chain;
  55.    destent.deadflag=srcent.deadflag;
  56.    destent.view_ofs=srcent.view_ofs;
  57.    destent.button0=srcent.button0;
  58.    destent.button1=srcent.button1;
  59.    destent.button2=srcent.button2;
  60.    destent.impulse=srcent.impulse;
  61.    destent.fixangle=srcent.fixangle;
  62.    destent.v_angle=srcent.v_angle;
  63.    destent.idealpitch=srcent.idealpitch;
  64.    destent.netname=srcent.netname;
  65.    destent.enemy=srcent.enemy;
  66.    destent.flags=srcent.flags;
  67.    destent.colormap=srcent.colormap;
  68.    destent.team=srcent.team;
  69.    destent.max_health=srcent.max_health;
  70.    destent.teleport_time=srcent.teleport_time;
  71.    destent.armortype=srcent.armortype;
  72.    destent.armorvalue=srcent.armorvalue;
  73.    destent.waterlevel=srcent.waterlevel;
  74.    destent.watertype=srcent.watertype;
  75.    destent.ideal_yaw=srcent.ideal_yaw;
  76.    destent.yaw_speed=srcent.yaw_speed;
  77.    destent.aiment=srcent.aiment;
  78.    destent.goalentity=srcent.goalentity;
  79.    destent.spawnflags=srcent.spawnflags;
  80.    destent.target=srcent.target;
  81.    destent.targetname=srcent.targetname;
  82.    destent.dmg_take=srcent.dmg_take;
  83.    destent.dmg_save=srcent.dmg_save;
  84.    destent.dmg_inflictor=srcent.dmg_inflictor;
  85.    destent.owner=srcent.owner;
  86.    destent.movedir=srcent.movedir;
  87.    destent.message=srcent.message;
  88.    destent.sounds=srcent.sounds;
  89.    destent.noise=srcent.noise;
  90.    destent.noise1=srcent.noise1;
  91.    destent.noise2=srcent.noise2;
  92.    destent.noise3=srcent.noise3;
  93.    destent.wad=srcent.wad;
  94.    destent.map=srcent.map;
  95.    destent.worldtype=srcent.worldtype;
  96.    destent.killtarget=srcent.killtarget;
  97.    destent.light_lev=srcent.light_lev;
  98.    destent.style=srcent.style;
  99.    destent.th_stand=srcent.th_stand;
  100.    destent.th_walk=srcent.th_walk;
  101.    destent.th_run=srcent.th_run;
  102.    destent.th_missile=srcent.th_missile;
  103.    destent.th_melee=srcent.th_melee;
  104.    destent.th_pain=srcent.th_pain;
  105.    destent.th_die=srcent.th_die;
  106.    destent.th_turn=srcent.th_turn;
  107.    destent.oldenemy=srcent.oldenemy;
  108.    destent.speed=srcent.speed;
  109.    destent.lefty=srcent.lefty;
  110.    destent.search_time=srcent.search_time;
  111.    destent.attack_state=srcent.attack_state;
  112.    destent.walkframe=srcent.walkframe;
  113.    destent.attack_finished=srcent.attack_finished;
  114.    destent.pain_finished=srcent.pain_finished;
  115.    destent.invincible_finished=srcent.invincible_finished;
  116.    destent.invisible_finished=srcent.invisible_finished;
  117.    destent.super_damage_finished=srcent.super_damage_finished;
  118.    destent.radsuit_finished=srcent.radsuit_finished;
  119.    destent.invincible_time=srcent.invincible_time;
  120.    destent.invincible_sound=srcent.invincible_sound;
  121.    destent.invisible_time=srcent.invisible_time;
  122.    destent.invisible_sound=srcent.invisible_sound;
  123.    destent.super_time=srcent.super_time;
  124.    destent.super_sound=srcent.super_sound;
  125.    destent.rad_time=srcent.rad_time;
  126.    destent.fly_sound=srcent.fly_sound;
  127.    destent.axhitme=srcent.axhitme;
  128.    destent.show_hostile=srcent.show_hostile;
  129.    destent.jump_flag=srcent.jump_flag;
  130.    destent.swim_flag=srcent.swim_flag;
  131.    destent.air_finished=srcent.air_finished;
  132.    destent.bubble_count=srcent.bubble_count;
  133.    destent.deathtype=srcent.deathtype;
  134.    destent.mdl=srcent.mdl;
  135.    destent.mangle=srcent.mangle;
  136.    destent.oldorigin=srcent.oldorigin;
  137.    destent.t_length=srcent.t_length;
  138.    destent.t_width=srcent.t_width;
  139.    destent.dest=srcent.dest;
  140.    destent.dest1=srcent.dest1;
  141.    destent.dest2=srcent.dest2;
  142.    destent.wait=srcent.wait;
  143.    destent.delay=srcent.delay;
  144.    destent.trigger_field=srcent.trigger_field;
  145.    destent.noise4=srcent.noise4;
  146.    destent.pausetime=srcent.pausetime;
  147.    destent.movetarget=srcent.movetarget;
  148.    destent.aflag=srcent.aflag;
  149.    destent.dmg=srcent.dmg;
  150.    destent.cnt=srcent.cnt;
  151.    destent.think1=srcent.think1;
  152.    destent.finaldest=srcent.finaldest;
  153.    destent.finalangle=srcent.finalangle;
  154.    destent.count=srcent.count;
  155.    destent.lip=srcent.lip;
  156.    destent.state=srcent.state;
  157.    destent.pos1=srcent.pos1;
  158.    destent.pos2=srcent.pos2;
  159.    destent.height=srcent.height;
  160.    destent.waitmin=srcent.waitmin;
  161.    destent.waitmax=srcent.waitmax;
  162.    destent.distance=srcent.distance;
  163.    destent.volume=srcent.volume;
  164.    destent.gorging=srcent.gorging;
  165.    destent.stoleweapon=srcent.stoleweapon;
  166.    destent.spawnfunction=srcent.spawnfunction;
  167.    destent.spawnthink=srcent.spawnthink;
  168.    destent.spawnmodel=srcent.spawnmodel;
  169.    destent.spawnsolidtype=srcent.spawnsolidtype;
  170.    destent.spawnmins=srcent.spawnmins;
  171.    destent.spawnmaxs=srcent.spawnmaxs;
  172.    destent.spawnclassname=srcent.spawnclassname;
  173.    };
  174.  
  175. //=========================
  176. //
  177. // SUB_NormalizeAngles
  178. //
  179. //=========================
  180.  
  181. vector ( vector ang ) SUB_NormalizeAngles =
  182.    {
  183.    while( ang_x > 360 )
  184.       {
  185.       ang_x = ang_x - 360;
  186.       }
  187.    while( ang_x < 0 )
  188.       {
  189.       ang_x = ang_x + 360;
  190.       }
  191.  
  192.    while( ang_y > 360 )
  193.       {
  194.       ang_y = ang_y - 360;
  195.       }
  196.    while( ang_y < 0 )
  197.       {
  198.       ang_y = ang_y + 360;
  199.       }
  200.  
  201.    while( ang_z > 360 )
  202.       {
  203.       ang_z = ang_z - 360;
  204.       }
  205.    while( ang_z < 0 )
  206.       {
  207.       ang_z = ang_z + 360;
  208.       }
  209.  
  210.    return ang;
  211.    };
  212.